linux matlab安装失败major

linux
Author

dd21

Published

December 5, 2022

微信公众号搜索linux资源库 里面有提供破解版

I got problems installing Matlab R2022a on Arch. Running the installer throws the following error:

terminate called after throwing an instance of ‘std::runtime_error’ what(): Failed to launch web window with error: Unable to launch the MATLABWindow application. The exit code was: 127 fish: Job 1, ‘sudo ./install’ terminated by signal SIGABRT (Abort)


I fixed it by running the following commands.

安装后还需要重新执行次操作
cd <matlab installer root directory>
cd /bin/glnxa64
ls | grep libfreetype
mkdir exclude
mv libfreetype.so.6 exclude/
mv libfreetype.so.6.16.0 exclude/

然后报错是因为matlab指向的是自带的libtiff.so.5需将软连接重新指向 系统的libtiff.so.5

bin/glnxa64/MATLABWindow: /home/dd21/Software/MATLAB/R2022b/bin/glnxa64/libtiff.so.5: version `LIBTIFF_4.0' not found (required by /usr/lib/libgdk_pixbuf-2.0.so.0)

解决方案

在matlab中输入,检测信息: cd(matlabroot) ! bin/glnxa64/MATLABWindow - slLibraryBrowser

# matlab install path 
cd /Software/MATLAB/R2022b/bin/glnxa64 
# create new linker
ln -s /usr/lib64/libtiff.so.5 ./libtiff.so.5
sudo vim /usr/share/applications/matlab.desktop

快捷方式

[Desktop Entry]
Version=R2020b
Type=Application
Terminal=false
MimeType=text/x-matlab
Exec=/usr/local/MATLAB/R2022b/bin/matlab -desktop
Name=MATLAB
Icon=matlab
Categories=Development;Math;Science
Comment=Scientific computing environment
StartupNotify=true